package com.csun.dsms.service;

import com.csun.dsms.comment.core.support.IService;
import com.csun.dsms.model.domain.DsmsRoleUser;

import java.util.List;

/**
 * @author chisj chisj@foxmail.com
 * @version 1.0.0
 * @date 2021-09-01 13:23
 * @description: TODO
 */
public interface DsmsRoleUserService extends IService<DsmsRoleUser> {

    /**
     * 用户是否绑定该角色.
     *
     * @param userId    the user id
     * @param roleId    the role id
     *
     * @return  the dsms role user.
     */
    DsmsRoleUser getByUserIdAndRoleId(Long userId, Long roleId);

    /**
     * 根据角色ID列表查询用户ID集合.
     * 
     * @param roleIdList    the role id list.
     *      
     * @return  the dsms role user list.
     */
    List<DsmsRoleUser> listByRoleIdList(List<Long> roleIdList);

    /**
     * 根据角色ID集合解除关联关系.
     *
     * @param roleIdList    the role id list.
     */
    Integer deleteByRoleIdList(List<Long> roleIdList);
}
